import { createRouter, createWebHashHistory } from "vue-router";
// import Home from "../views/Home.vue";

// import Vue from 'vue'
// import Router from 'vue-router'
import userlist from "../views/usermanager/userlist.vue";
import login from "../views/login/login.vue";
import mainenu from "../views/main/mainmenu.vue";

// Vue.use(Router)

const routes = [
  {
    path: "/",
    name: "login",
    component: login,
  },
  {
    path: "/login",
    name: "login2",
    component: login,
  },
  // {
  //   path: "/",
  //   name: "Home",
  //   component: Home,
  // },
  // {
  //   path: "/userlist",
  //   name: "userlist2",
  //   component: userlist,
  // },
  {
    path: "/mainenu",
    name: "mainenu",
    component: mainenu,
    children: [
      {
        path: "",
        name: "userlist",
        component: userlist,
      },
      {
        path: "userlist",
        name: "userlist2",
        component: userlist,
      },
    ],
  },

  // {
  //   path: "/",
  //   name: "Home",
  //   component: Home,
  // },
  // {
  //   path: "/about",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/About.vue"),
  // },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
